<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div id="app"></div>
</body>
<script>
    const myPlugin = {
        install (app, options) {
            // app是当前的Vue实例化对象，是可改名的形参
            console.log(app, options);
        },
    }
    let vm = {
        data () {
            return {
            }
        },
    }
    const app = Vue.createApp(vm)
    app.use(myPlugin, { name: 'GalaxySa' })
    app.mount('#app')
</script>

</html>